<?php

namespace Visitors;

use Visitors\VisitsInfo;
use Visitors\Visits;

/**
 * Выводим кол-во новых посешений профиля с последнего просмотра списка
 */
class NewVisitorsAction extends \Action // VisitorCountAction
{
	
	static function pullParams() {
		return ['identity'];
	}
	
	protected function run() {
		$profile = VisitsInfo::find ()->where ( 'profile._ref', $this->request->_identity )->one ();
		$this->response->unSeenCount = $profile->unSeenCount;
		$this->response->profileVisitorsByMonth = $profile->profileVisitorsByMonth;
	}
}